package com.xauto.pioneer.appuser.model;

import org.json.JSONObject;

/**
 * 车辆等级对象
 * @author Lemon Mon 27 Feb 16:10
 */
public class CarGroupInfo extends BaseModel<CarGroupInfo> {

    /** 车辆等级ID*/
    public String car_group_id;
    /** 车辆等级名称*/
    public String car_group_name;
    /** 车辆类型(1-油车/2-电车/0-未知)*/
    public String car_type;

    public CarGroupInfo() {
    }


    public CarGroupInfo(String car_group_id, String car_group_name) {
        this.car_group_id = car_group_id;
        this.car_group_name = car_group_name;
        this.car_type = car_type;
    }

    @Override
    public CarGroupInfo parse(JSONObject jsonObject) {
        if(jsonObject != null) {
            car_group_id = jsonObject.optString("car_group_id");
            car_group_name = jsonObject.optString("car_group_name");
            car_type = jsonObject.optString("car_type");
            return this;
        }
        return null;
    }
}
